from django.contrib.syndication.feeds import FeedDoesNotExist
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.sites.models import Site
from django.contrib.syndication.feeds import Feed
from django.core.urlresolvers import reverse
from dsp.core.models import Post



class LatestEntries(Feed):
    title = "Logans Blog"
    link = "/blog/"
    description = "Latest posts from logans blog"

    def items(self):
        return Post.objects.order_by('-date')[:5]

